package classifier;

public class CancerModel {

	public static int lowMedHighClassifier(double breast, double colon, double lung){
//Cluster centroids:
//            Cluster#
//Attribute                    Full Data          0          1          2
//								   (3141)     (1914)     (1033)      (194)
//=======================================================================
//percentBreastCancerDeaths       0.0013     0.0006     0.0021     0.0049
//							   +/-0.0016  +/-0.0004  +/-0.0009   +/-0.004
//
//percentColonCancerDeaths        0.0013     0.0005     0.0019     0.0061
//							   +/-0.0017  +/-0.0004  +/-0.0008  +/-0.0032
//
//percentLungCancerDeaths         0.0039     0.0013      0.007     0.0127
//							   +/-0.0056   +/-0.001  +/-0.0066  +/-0.0089
		int b = -1, c = -1, l = -1;
		int total = 0, tally = 0;
		if(breast > 0){
			if(breast >= 0.0037) b = 3;
			if(breast <  0.0037) b = 2;
			if(breast <  0.0011) b = 1;
			total++;
			tally += b;
		}
		if(colon > 0){
			if(colon >= 0.0028) c = 3;
			if(colon <  0.0028) c = 2;
			if(colon <  0.0010) c = 1;
			total++;
			tally += c;
		}
		if(lung > 0){
			if(lung >= 0.00985) l = 3;
			if(lung <  0.00985) l = 2;
			if(lung <  0.00415) l = 1;
			total++;
			tally += l;
		}
		if(total > 0)
			return tally / total;
		return -1;
	}
}
